The present invention relates to gamma correction in computer systems and in particular to the automatic correction of gamma for multiple video sources.
Cathode ray tubes, commonly referred to as xe2x80x9cCRTsxe2x80x9d, are made with electron guns which are controlled by electromagnetic fields to provide a picture on a screen. The electromagnetic fields are modulated by an input voltage representative of desired intensity. In the early days of television it was discovered that CRT""s do not produce a light intensity that is proportional to the input voltage which controls the strength of the fields. Instead, the intensity produced by a CRT is proportional to an input voltage varying between zero and 1.0 raised to the power of a constant referred to as gamma. Gamma can be defined as a constant which is used to account for the non-linear relationship between pixel values in an image and the displayed intensity of each pixel typical for the CRT. The value of gamma varies depending on the CRT, but is usually close to 2.5. Thus, an input voltage of 0.5 raised to the power of 2.5 results in an image intensity of 0.177, considerably less than intended.
Most sensors used in television cameras produce output voltages proportional to scene intensity. A correction for CRT gamma must be applied to the camera signal to avoid having portions of the scenes appear too dark on the TV set. When television standards were defined it was decided to correct for the gamma of the CRT in every television set by using a correction circuit in the camera. Each camera was designed to apply a gamma which is close to the inverse of the gamma inherent in TV sets. A gamma for the camera of 0.45 (approximately 1/2.2) was chosen to simultaneously correct for the CRT gamma of 2.5 and also to compensate for the apparent reduction of contrast which occurs when a TV is viewed against the dim background typically found in a living room. Applying a gamma of 0.45 is referred to in the art as applying a gamma correction of 2.2.
Many computer software applications ignore the effect of CRT monitor gamma or display gamma. Application software and other types of software provide information to be displayed visually on a CRT. This information is stored in a frame buffer, and is converted linearly into voltages that drive the CRT in the display. The values in the frame buffer are not proportional to the resulting intensity. A frame buffer value of xc2xd the maximum intensity will produce less than xc2xd the intensity on the display.
Some display systems contain hardware lookup tables that correct for monitor gamma. The hardware lookup table contains a specific gamma value necessary to offset the gamma of the CRT and provide a better display of desired images. On these systems, the frame buffer values provided by the application are corrected for the gamma of the CRT by a lookup table in the display controller, producing a display system gamma of 1.0 which linearly maps frame buffer values into intensity. In U.S. Pat. No. 5,589,889 to Kawaoka, gamma lookup tables are set by a processor for both a desired video camera and also for a desired display device. The lookup tables appear to contain a gamma setting for just one device.
The lack of standardization in dealing with monitor gamma has caused significant problems with entities like the World Wide Web which distribute images to different types of displays. An image that looks good on one brand of display might have certain colors, such as mid tones too bright or too dark on a different brand of display, because of the difference in the displays"" gamma. Lack of gamma correction also affects color hues by changing the relative intensities of the red, green, and blue colors in a non-linear fashion.
Some file formats, such as the tagged information file format (TIFF) and the proposed portable network graphics (PNG) format have provisions for specifying the gamma for each of the red, green and blue channels. However, there are still many other sources of video and image, referred to as content, which do not provide gamma. In addition, many displays also have different gamma, making it extremely difficult to ensure that a display is properly corrected for the content to be displayed. This is particularly a problem when a laptop computer user desires to use a display different than the display provided with the laptop. For example, a laptop computer user working at home may use a large CRT monitor or a projection display for a presentation instead of the monitor integrated into the laptop. There is a problem ensuring that gamma is corrected for all such displays. If the user happens to know the gamma of the content, along with any gamma correction currently provided by the laptop, and still further the gamma of the display device, and yet further has the ability to change one of the gammas, the overall gamma can be properly set. Not many users have this ability. There is a need for correcting all these gammas conveniently and accurately.
Multiple gamma profiles are provided for combinations of multiple display types and content sources. Gamma correction is then performed by automatically selecting the appropriate profile for a detected combination of display and source such that content is displayed with a desired intensity.
In one embodiment, a computer system has a video output connection capable of connecting to two or more different display devices. A system video input connection is capable of receiving video from at least one of multiple video sources. A table of gamma profiles is indexed by both the display and video source. A software module applies a gamma correction from the table to the received video to provide it to the display. When the display applies its gamma, the video is displayed with the proper intensity. In a further embodiment, the video is encoded with a gamma identifier which is used to index into the table of system gammas, or is used to calculate the proper correction.
In another embodiment, gamma correction is digitally controlled by software in a video driver. A number of predetermined settings are stored in a memory and recalled when different display devices are detected or selected. Detection of a different content or video source triggers the recalling of a setting corresponding to the source. System gamma is then set in accordance with the setting to arrive at a total gamma which provides an optimal image display.
In a further embodiment of the invention, gamma correction is performed by a video card to correct either a video source or content gamma. Electronic circuitry within the video card evaluates a source signal and performs necessary calculations to correct the source signal based on gamma values stored in its memory for the ultimate display at the display device.